package com.hgkj.cloud.base.service;

import com.github.pagehelper.Page;
import com.hgkj.cloud.base.common.PageInfo;
import com.hgkj.cloud.base.domain.TenantTableTaskInfo;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

public interface TenantTableTaskInfoService {

    int deleteByPrimaryKey(String uuid);

    int insert(TenantTableTaskInfo record);

    int insertSelective(TenantTableTaskInfo record);

    TenantTableTaskInfo selectByPrimaryKey(String uuid);

    TenantTableTaskInfo selectTaskInfoByMap(Map<String, Object> map);

    int updateByPrimaryKeySelective(TenantTableTaskInfo record);

    int updateByPrimaryKey(TenantTableTaskInfo record);

    int deleteTableTaskInfo(Map<String, Object> map);

    List<TenantTableTaskInfo> listTableTaskInfoByTaskUuid(String task_uuid);

    List<TenantTableTaskInfo> findFinishedTableTask(Map<String, Object> map);

    List<TenantTableTaskInfo> listUserFinishedTaskInfos(PageInfo pi, Map<String, Object> map);

    List<Map<String, Object>> listPageTableTaskInfos(PageInfo pi, Map<String, Object> map);

    int listPageTableTaskInfosCount(Map<String, Object> map);

    List<Map<String, Object>> listAllTableTaskInfos(Map<String, Object> map);

    List<TenantTableTaskInfo> listCheckTableTaskInfos(String task_uuid);

    List<TenantTableTaskInfo> getTableTaskInfo(Map<String, Object> map);

    int countTestUsers(Map<String, Object> map);

    int countTaskFinishedUsers(String task_uuid);

    List<Map<String, Object>> selectCountWarningUsers(Map<String, Object> map);

    List<Map<String, Object>> listTableFactorUser(PageInfo pi, Map<String, Object> map);

    int listTableFactorUserCount(Map<String, Object> map);

    //base
    Page<HashMap<String, Object>> listPageTableTaskInfos(Integer pageNum, Integer PageSize, Map<String, Object> map);


    TenantTableTaskInfo findTableTaskInfoByUuid(String uuid);

    List<Map> listAllTableTaskInfosCount(Map<String, Object> map);

    void updateTaskInfoToChongzhi(String uuid);
    //base

    List<String> listTableFactorValues(Map<String, Object> map);

    int listTableFactorCount(Map<String, Object> map);

    List<Map<String, Object>> listTableAnazyleCounts(Map<String, Object> map);

    List<Map<String, Object>> listTableAnazyleCountsByMap(Map<String, Object> map);

    List<Map<String, Object>> listTableAnazyleFactorUser(PageInfo pi, Map<String, Object> map);

    int countListTableAnazyleFactorUser(Map<String, Object> map);

    List<Map<String, Object>> listTableAnazyleFactorUserByMap(PageInfo pi, Map<String, Object> map);

    int countListTableAnazyleFactorUserByMap(Map<String, Object> map);

    List<Map> getCommitSuicidePeople(Map<String, Object> map);

    Map<String, Object> getPoliceStressGender(Map<String, Object> map);

    List<Map<String, Object>> getPoliceStressGenderUsers(PageInfo pi, Map<String, Object> map);

    Long getPoliceStressGenderUsersCount(Map<String, Object> map);

    List<Map> getPoliceStressTenant(Map<String, Object> map);

    List<Map> getPoliceStressTime(Map<String, Object> map);

    Map<String, Object> statAllJoinTableTaskInfoRate(Map<String, Object> map);

    public Map<String, Object> statMonthTableTaskInfo(Map<String, Object> map);

    int statTableTaskInfoCount(Map<String, Object> map);

    //获取用户参加的测评任务数
    Long getUserTask(Map<String, Object> map);

    //获取用户参加的测评任务总量表数
    Map<String, Long> getUserTaskInfo(Map<String, Object> map);


    List<Map<String, Object>> statTenFactorWarning(Map<String, Object> map);

    int getUserTaskInfoFinishedCount(Map<String, Object> map);

    List<Map<String, Object>> listExcptionTableTaskInfos();

    List<Map<String, Object>> listExcptionTableTasks();

    void saveTasksInfoAndReports(String userUuid, String frameworkId, String value, String times, String taskInfoUuid);

}
